#pragma once
#include"Comm.hpp"


class Client
{
public:
    Client():_fd(gdefultfd)
    {}

    ~Client()
    {}

    bool OpenPipeForWrite()
    {
        _fd = OpenPipe(gForWrite);
        if(_fd < 0)
        {
            return false;
        }

        return true;
    }

    int SendPipe(const std::string&in)
    {
        return ::write(_fd,in.c_str(),in.size());
    }

    void ClosePipe()
    {
        CloseHelper(_fd);
    }

private:
    int _fd;
};